// //引入db配置
// const db = require('../config/db')
// //引入sequelize对象
// const Sequelize = db.sequelize

// //引入数据表模型
// const contact = Sequelize.import('../module/contact');
// //自动创建表
// contact.sync({
//     force: false
// });

// //数据库操作类
// class contactModule {
//     static async userContact(data) {
//         return await contact.contact({
//             id: data.id,
//             name: data.name,
//             job_title: data.job_title,
//             email: data.email,
//             phone: data.phone,
//             company: data.company,
//             industry: data.industry,
//             message: data.message,
//             first_name: data.first_name,
//             last_name: data.last_name,
//             country: data.country,
//             created_at: data.created_at,
//             updated_at: data.updated_at,
//             currency: data.currency,
//             client_ip: data.client_ip,
//             website: data.website,
//         })
//     }


// }
// //功能处理
// class contactController {
//     //注册用户
//     static async contact(ctx) {
//         const req = ctx.request.body;
//         console.log(req)
//         try {
//             const param = {
//                 id: req.id,
//                 first_name: req.first_name,
//                 last_name: req.last_name,
//                 email: req.email,
//                 phone: req.phone,
//                 industry: req.industry,
//                 company: req.company,
//                 message: req.message,
//                 job_title: req.job_title,
//                 currency: req.currency,
//                 country: req.country,
//                 created_at: req.created_at,
//                 updated_at: req.updated_at,
//                 client_ip: req.client_ip,
//                 website: req.website,
//             }
//             const data = await contactModule.userContact(param);
//             console.log(`data: ${JSON.stringify(data)}`)
//             ctx.response.status = 200;
//             ctx.body = {
//                 code: 0,
//                 desc: 'contact success',
//                 data
//             }
//         } catch (error) {
//             ctx.response.status = 416;
//             ctx.body = {
//                 code: -1,
//                 desc: '参数不齐全'
//             }
//         }
//     }
// }

// module.exports = contactController;